﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WF.DAL;

namespace WF.Model
{
    [Serializable]
    public class RoleEntity : EntityBase<Role>
    {
        #region 构造函数


        public RoleEntity() : base() { }
        public RoleEntity(Role obj) : base(obj) { }
        #endregion

        #region 实现基类abstract属性


        public override string ID
        {
            get
            {
                return DbEntity.RoleID;
            }
            set
            {
                DbEntity.RoleID = value; this.SendPropertyChanged("RoleID");
            }
        }

        public override string DisplayName
        {
            get { return DbEntity.RoleName; }
        }

        #endregion

        #region Public 属性


        public string RoleName
        {
            get
            {
                return DbEntity.RoleName;
            }
            set
            {
                DbEntity.RoleName = value; this.SendPropertyChanged("RoleName");
            }
        }

        public string Description
        {
            get
            {
                return DbEntity.Description;
            }
            set
            {
                DbEntity.Description = value; this.SendPropertyChanged("Description");
            }
        }

        public System.Xml.Linq.XElement ACL
        {
            get
            {
                return DbEntity.ACL;
            }
            set
            {
                DbEntity.ACL = value; this.SendPropertyChanged("ACL");
            }
        }

        public short FlagDeleted
        {
            get
            {
                return DbEntity.FlagDeleted;
            }
            set
            {
                DbEntity.FlagDeleted = value; this.SendPropertyChanged("FlagDeleted");
            }
        }
        #endregion
    }
}
